package com.stsolutions.budgetcontroller.model.data;

import java.util.LinkedList;
import java.util.Collection;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.field.ForeignCollectionField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "cost_type")
public class CostType {
	/**
	 * 
	 */
	@DatabaseField(generatedId = true)
	private int costTypeId;

	@DatabaseField
	private String costTypeName;

	@ForeignCollectionField(eager = false)
	private Collection<Cost> costs;

	public CostType() {
		costs = new LinkedList<Cost>();
	}

	public Collection<Cost> getCosts() {
		return costs;
	}

	public void setCosts(Collection<Cost> costs) {
		this.costs = costs;
	}

	public String getCostTypeName() {
		return costTypeName;
	}

	public void setCostTypeName(String costTypeName) {
		this.costTypeName = costTypeName;
	}

	public int getCostTypeId() {
		return costTypeId;
	}

	public void setCostTypeId(int costTypeId) {
		this.costTypeId = costTypeId;
	}

	public String toString() {
		return costTypeName;
	}

}
